import request from "@/utils/request";

export function addCharProduct(data) {
  return request({
    url: "/api/charProduct/add",
    method: "post",
    data,
  });
}

export function updateCharProduct(data) {
  return request({
    url: "/api/charProduct/update",
    method: "post",
    data,
  });
}

export function reqCharProductInfo(pageNo,pageSize){
  return request({
    url:`/api/charProduct/info?pageNo=${pageNo}&pageSize=${pageSize}`,
    method:"get"
  })
}

export function delCharProduct(data) {
  return request({
    url: `/api/charProduct/remove`,
    method: "post",
    data
  });
}

export function delBatchCharProduct(data) {
  return request({
    url: "/api/charProduct/delBatch",
    method: "post",
    data,
  });
}

export function searchCharProduct(productName){
  return request({
    url: `/api/charProduct/search?productName=${productName}`,
    method: "get",
  });
}
